<?php
/**
 * The loop that displays a page.
 *
 * The loop displays the posts and the post content. See
 * http://codex.wordpress.org/The_Loop to understand it and
 * http://codex.wordpress.org/Template_Tags to understand
 * the tags used in it.
 *
 * This can be overridden in child themes with loop-page.php.
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.2
 */
?>

<?php // The Query
$the_query = new WP_Query( array('post_type'=>'tribe_events','posts_per_page'=>4 ) );
$eidx = 1;
// The Loop
if( $the_query->have_posts() ) : 
while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
		<?php
			if ( $eidx == 1 && has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
		?>
			  <div class="footer_column_image"><?php the_post_thumbnail('full'); ?></div>
		<?php
			}
			$eidx++;		
		?>
		<div class="footer_list">
			<div class="group">
			
				<div class="left" style="width:8px;"><img src="<?php bloginfo( 'template_url' ); ?>/images/list.jpg" alt="list" /></div>
				<div class="left" style="width:298px">
					<a href="<?php echo tribe_get_event_link();?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
						<?php the_title(); ?>
					</a>
				</div>
			</div>
			
			<div class="list_date"><?php echo tribe_get_start_date( $post->ID, true, 'F m, Y' ); ?></div>
		</div>
	
<?php 
$eidx++;
endwhile; // end of the loop. 
//wp_reset_postdata();
 else : ?>
 <div class="footer_list">
	<div>
		<img src="<?php bloginfo( 'template_url' ); ?>/images/list.jpg" alt="list" />
		No Event
	</div>
	
</div>
 <?php endif; ?>
